<h2><a href="/Manage/Show3D/Admin">360展示管理</a></h2>
<?php
$cs = Yii::app()->clientScript;
$cs->registerScriptFile(BASE_URL . '/js/yu_zoom/jquery.mousewheel.min.js', CClientScript::POS_END);
$cs->registerScriptFile(BASE_URL . '/assets/2bad628c/jui/js/jquery-ui.min.js', CClientScript::POS_END);
$cs->registerScriptFile(BASE_URL . '/js/yu_zoom/yuZoom_lan_zh-cn.js', CClientScript::POS_END);
$cs->registerScriptFile(BASE_URL . '/js/yu_zoom/des.js', CClientScript::POS_END);
$cs->registerScriptFile(BASE_URL . '/js/yu_zoom/yuUtils.js', CClientScript::POS_END);
$cs->registerScriptFile(BASE_URL . '/js/yu_zoom/yuZoom.js', CClientScript::POS_END);
$cs->registerCssFile(BASE_URL . '/js/yu_zoom/css/yuZoom.css');

$this->menu = array(
	array('label'=>'添加360展示', 'url'=>array('edit'), 'visible'=>Yii::app()->user->v('manage@Show3DEdit')),
);
$table = new YDataGrid($list, array(
	'columns' => array(
		'name'
	),
	'key' => '_id'
));

$table
->setTitles(array('展示产品'))
->insertCol(0, array(
	YHtmlDataGrid::link('编辑', '/manage/Show3D/Edit/{$key}', array('visible'=>Yii::app()->user->v('manage@Show3DEdit'))),
	YHtmlDataGrid::jsLink('快速预览', 'show3D', array('class'=>'view')),
	YHtmlDataGrid::link('新窗口预览', '/manage/Show3D/{$key}', array('target'=>'_blank')),
), '操作')
->render(false);
?>
<script>
	var box = null;
	var yuZoom = null;
	var yuZoomKey = '<?php echo YU_ZOOM_KEY ?>';
	function show3D(id){
		if(box === null){
			box = new ExtBox();
			box.addItem({
				id : 'view',
				title : '快速预览',
				url : '',
				width : 500,
				height : 500,
				expend : true,
				del_on_close : true,
				close : function(){
					box = null;
				},
				open : function(){
					$('#ext_info_contner').html(
						'<div id="show_3d" style="display:inline-block;width:500px;height:500px;"></div>'
					).css({'overflow':'hidden'});
					show(id);
				}
			});
		}else{
			show(id);
		}
	}

	function show(id){
		yuZoom = new YuZoom({
			content: $("#show_3d"),
			configUrl : '/Show360/Conf/' + id
		});
	}
</script>